package com.gyg.client;

import com.gyg.returns.RespEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "cloudRecordClient", url = "${cloud.box.url}")
public interface CloudRecordClient {

    /**
     * 实时操作记录
     * @param userId
     * @return
     */
    @GetMapping("/cloud-record/recent")
    RespEntity getRecentCloudRecord(@RequestParam(value = "userId") Integer userId);

    /**
     * 最近七日操作数量
     * @param userId
     * @return
     */
    @GetMapping("/cloud-record/seven")
    RespEntity getRecentSevenDays(@RequestParam(value = "userId") Integer userId);

    /**
     * 操作记录列表
     * @param userId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @GetMapping("/cloud-record/list")
    RespEntity cloudRecordList(@RequestParam(value = "userId", required = true) Integer userId,
                               @RequestParam(value = "pageNum", required = true) Integer pageNum,
                               @RequestParam(value = "pageSize", required = true) Integer pageSize);
}
